package org.dromara.system.dubbo;

import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.domain.R;
import org.dromara.system.api.RemotePayService;
import org.dromara.system.service.IPayAppService;
import org.dromara.system.service.IPayGroupAccountService;
import org.dromara.system.service.IPayOrderService;
import org.dromara.system.service.IPayRateService;
import org.springframework.stereotype.Service;

/**
 * 支付相关调用
 *
 * @author Gavino
 */
@RequiredArgsConstructor
@Service
@DubboService
public class RemotePayServiceImpl implements RemotePayService {

    private final IPayRateService payRateService;
    private final IPayGroupAccountService payGroupAccountService;
    private final IPayAppService payAppService;
    private final IPayOrderService payOrderService;


    @Override
    public R<?> payRateRefresh() {
        return payRateService.refresh();
    }

    @Override
    public void refreshAccountMoney() {
        payGroupAccountService.refreshAccountMoney();
    }

    @Override
    public void refreshAppMoney() {
        payAppService.refreshAppMoney();
    }

    @Override
    public void refreshClientMoney() {

    }

    @Override
    public void orderCallbackC(String orderId) {

    }

    @Override
    public R<?> cleanOrder(String time) {
       return payOrderService.cleanOrder(time);
    }
}
